home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_test / test_eval13.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  674 b   |  51 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_EVAL13
  5.  
  6. creation make
  7.    
  8. feature 
  9.    
  10.    make is
  11.       local
  12.      s1, s2: STRING;
  13.      a: ANIMAL;
  14.      cat: CAT;
  15.      dog: DOG;
  16.       do
  17.      s1 := foo;
  18.      s2 := foo;
  19.      check
  20.         s1 = s2;
  21.         not (s1 /= s2);
  22.      end;
  23.  
  24.      !!cat;
  25.      check
  26.         cat /= Void;
  27.         not cat.is_dog;
  28.         cat.is_cat;
  29.      end;
  30.      !!dog;
  31.      a := dog;
  32.      check
  33.         not a.is_cat;
  34.         a.is_dog;
  35.      end;
  36.      a := Void;
  37.      check
  38.         a = Void;
  39.         not (a /= Void)
  40.      end;
  41.      !CAT!a;
  42.      check
  43.         cat.is_cat;
  44.         not cat.is_dog;
  45.      end;
  46.       end;
  47.  
  48.    foo: STRING is "foo";
  49.  
  50. end -- TEST_EVAL13
  51.